Wednesday 3 March 2021
Proportion of success
\[ \frac{\varphi}{\varphi + \theta} \]
All trials
\[ \varphi + \theta \]
We often think of science as a function of success
\[ \varphi \sim \text{Binomial}\left( \varphi + \theta,\, \frac{\varphi}{\varphi + \theta}\right) \]
\(\color{darkgreen}{\text{mathematics}}\) \(\to\)
code \(\to\)
paper \(\to\)
toolthe nature of interdisciplinary research
\(\color{darkred}{\times}\) mathematics \(\not\to\)
\(\color{darkred}{\times}\) code \(\not\to\)
\(\color{darkred}{\times}\) paper \(\not\to\)
\(\color{darkred}{\times}\) tool
An open source license for academics has additional needs:
Recommended by @DrVeronikaCH whose How I Fail blog is well worth checking out.
## # A tibble: 6 x 1 ## sections_in_this_talk ## <chr> ## 1 **.Rmd**-driven development ## 2 **functions** ## 3 **documentation** of functions ## 4 **git** and version control ## 5 **testing** of functions and data ## 6 reproducible **document** for publication
| sections |
|---|
.Rmd-driven development |
functions |
documentation of functions |
git and version control |
testing of functions and data |
reproducible document for publication |
Suppose we’re interested in the 5 most frequent observations in farming production systems considered in this 1072, 84 systematic review.
## # A tibble: 3 x 4 ## short_title farmingproduction… farmingproductio… farmingproductio… ## <chr> <chr> <chr> <chr> ## 1 Aaron (2005) <NA> <NA> <NA> ## 2 Aavik (2008) Livestock <NA> Cropped fields (… ## 3 Aavik (2010) <NA> <NA> <NA>
These data can be analysed and formatted nicely in document.
bufferstrips %>%
select(short_title,
contains("farmingproduction")) %>%
pivot_longer(
cols = contains("farming"),
names_to = "production_system",
values_to = "system_value",
values_drop_na = TRUE
) %>%
separate(col = production_system,
into = c("farming", "system")) %>%
filter(system_value != "Not described",
!str_detect(system_value, "Other")) %>%
count(system) %>%
arrange(desc(n)) %>%
head(5) %>%
gt()
| system | n |
|---|---|
| croppedfields | 738 |
| croppedfieldsinfo | 445 |
| livestock | 199 |
| grassland | 107 |
| livestockinfo | 92 |
| Some Useful Resources | ||||
|---|---|---|---|---|
| .Rmd | ||||
| Item Type | Author | Title | Date | Topic |
| blogPost | Riederer, Emily | 2019-05-04 | .Rmd | |
| book | Grolemund, Yihui Xie, J. J. Allaire, Garrett | 2020 | .Rmd | |
| This is not intended to be a definitive list; these are the resources that helped me the most when I was failing at .Rmd. Share the resources that worked for you via @R-Ladies Freiburg on twitter, or in the chapter's slack group. | ||||
Set up with Happy Git to R
Create repository on GitHub
# pr helpers pr_init(branch = "idea") # make changes # commit pr_push() # wait for merge pr_finish()
| Some Useful Resources | ||||
|---|---|---|---|---|
| git | ||||
| Item Type | Author | Title | Date | Topic |
| book | Bryan, Jennifer | 2019 | git | |
| journalArticle | Bryan, Jennifer | 2018-01-02 | git | |
| book | various | 2021 | git | |
| book | various | 2021 | git | |
| This is not intended to be a definitive list; these are the resources that helped me the most when I was failing at git. Share the resources that worked for you via @R-Ladies Freiburg on twitter, or in the chapter's slack group. | ||||
If you failed, it means you tried.
You’ll never get everything right in computational science.
Trying is the best you can do. You will fail. You find useful workflows.